<template>
	<view class="class-list-warp">
		<view class="title">
			<view class="title-left">
				<text class="title-text">我的课程</text>
			</view>
			<slot name="title-right"></slot>
		</view>
		<view class="class-list">
			<slot name="list-item"></slot>
			<view v-if="classStore.classListFilter.length == 0" style="text-align: center;">
				<u-empty text="暂无内容" mode="list"></u-empty>
			</view>
		</view>
	</view>
</template>

<script lang="ts" setup>
	import { useClassStore } from '@/store/class';
	
	/** 课程列表：容器 */
	defineOptions({ name: 'class-list-warp', inheritAttrs: false });
	
	const classStore = useClassStore();
</script>

<style lang="scss">
	.class-list-warp{
		--card-margin: 30rpx;
		margin: 50rpx var(--card-margin);
	}
	.title{
		display: flex;
		align-items: center;
		margin-bottom: 20rpx;
		
		.title-left{
			flex: 1;
			display: flex;
			align-items: center;
		}
		
		.title-text{
			font-size: 40rpx;
			margin-right: 16rpx;
		}
		
		.title-tag{
			display: inline-block;
			background: linear-gradient(to right, #f16e03, #eb9c28);
			color: #fff;
			font-size: var(--text-12);
			padding-left: 12rpx;
			padding-right: 12rpx;
			border-radius: 8rpx;
			margin-top: 6rpx;
		}
		.title-more{ color: #474443; font-size: var(--text-14);}
	}
	
	/* 针对 1280px 分辨率 */
	@media(min-width:1200px) {
		.class-list-warp {
			--card-margin: 60rpx;
		}
		.title {
			font-size: 50rpx;
	
			.title-tag {
				padding-top: 5rpx;
				padding-bottom: 5rpx;
			}
	
			.title-more {
				font-size: 36rpx;
			}
		}
	}
</style>